<?php

	/**
	 * Workspace@ Engine application comment!
	 * 
	 * LICENSE
	 * This application is licensed under New BSD license.
	 * Please read complete LICENSE.txt inside of root folder for more details.
	 * 
	 * We wish you good building :) 
	 * 
	 * @category   Application
	 * @package    Bootstrap
	 * @author     Nevio Vesic <nevio@workspaceat.com>
	 * @copyright  2008-2009 Workspace@ group in association with Design strategist
	 */
	
	/**
	 * @see Engine_Repository
	 */
	require_once 'Repository.php';
	
	/**
	 * @see Engine_Plugins
	 */
	require_once 'Plugins.php';
	
	/**
	 * @see Engine_Application_Page
	 */
	require_once 'Application/Page.php';
	
	/**
	 * @see Engine_Application_Abstract
	 */
	require_once 'Application/Abstract.php';
	
	/**
	 * 
	 *
	 */
	class Engine_Application extends Engine_Application_Abstract
	{

		
		public function __construct( $data )
		{
			# initialize system config
			$this->getSystemConfig();
			
			self::$repository = $this->initRepository( $data );
			self::$plugins = $this->initPlugins( $data );
			
			# lets get page
			self::$page = $this->initPage( $data );
		}
		
		public function throwErrors( $status )
		{
			
		}

		public function run()
		{
			self::$page -> dispatch();
		}
	}